//
//  vdTextNode.h
//  Void Dead
//
//  Created by Sidney Just on 19.11.09.
//
//  Copyright © 2009 by Sidney Just
//  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
//  documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
//  the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 
//  and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
//  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
//  PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 
//  FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
//  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#import <Foundation/Foundation.h>

#import "vdNode.h"
#import "support/Texture2D.h"
#import "vdColor.h"
#import "vdRenderer.h"
#import "vdTexNode.h"

#import "vdShaderLib.h"

/**
 * Class that represents a Textlabel.
 **/
@interface vdLabel : vdNode {
	//\cond
	NSString *string;
	//\endcond
	@private
	NSString *lastFont;
	int fontSize;
	
	Texture2D *tex;
}

/**
 * The string that will be displayed or NULL
 **/
@property (nonatomic, retain, readonly) NSString *string;

/**
 * Sets the string that should be displayed.
 * <br> This command will use the default font (American Typewriter) and default font size (12)
 @param str The new string of the label
 **/
- (void)setString:(NSString *)str;

/**
 * Sets the string that should be displayed with the given font and size.
 * <br> This command will set the default font and default font size to your given values. The next [vdLabel setString:] call will use this new default font and font size!!!
 @param aStr The new string of the label
 @param aFont The new font (must exist in the fontFamily of the iPhone/iTouch)
 @param aSize The size of the font
 **/
- (void)setString:(NSString *)aStr font:(NSString *)aFont size:(int)aSize;

/**
 * Draws the vdLabel on the screen
 **/
- (void)draw:(NSTimeInterval)deltaTime;

/**
 * Creates, initializes and returns a vdLabel
 @param str The string of the new label
 @return Pointer to the new label
 **/
+ (vdLabel *)labelWithText:(NSString *)str;


@end
